<!-- eslint-disable vue/require-valid-default-prop -->
<script setup>
import { ref } from 'vue'
const message = ref('')
defineProps({
  list: { type: Object, default: {} }
})
const emit = defineEmits(['submit'])
const onSubmit = () => {
  emit('submit', { content: message.value })
}
</script>
<template>
  <div class="v-post-bottom">
    <van-field
      v-model="message"
      rows="1"
      autosize
      type="textarea"
      :placeholder="'回复 @' + list.nickName"
    />
    <span @click="onSubmit">发布</span>
  </div>
</template>
<style lang="scss" scoped>
.v-post-bottom {
  border-top: 1px solid #928484;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  .van-field {
    width: 300px;
    padding: 5px 10px;
    border-radius: 18px;
    background: #f2f3f5;
    .van-field__control::-webkit-scrollbar {
      width: 0px;
      height: 0px;
      background-color: transparent;
    }
  }
  span {
    font-size: 14px;
    color: #a7c7ff;
    line-height: 21px;
  }
}
</style>
